<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <?php include "common/session.php" ?>
    <?php include "common/common.php" ?>
</head>

<body>
    <div id="wrapper">
	    
	    <?php include "common/header.php" ?>
	    <?php include "common/menu.php" ?>
	
	    <div id="content">
		    <!--div id="tip">
		        <img src="images/ok.png" />&nbsp;ping ok&nbsp;<img src="images/nok.png" />&nbsp;ping nok&nbsp;
		        <img src="images/connected.png" />&nbsp;connected&nbsp;<img src="images/idle.png" />&nbsp;offline&nbsp;
		        <img src="images/traffic.gif" />&nbsp;traffic on&nbsp;<img src="images/lock.png" />&nbsp;locked
		    </div-->
		    <div id="refresh">
	            <script type="text/javascript" language="javascript">
		        <?php
			        if (isset($_GET["user"]) && isset($_SESSION["uid"])) {
				        echo "setInterval(\"dynamicDiv('table_div', 'common/host/host_info.php?user={$_GET['user']}')\", 1500);";
				    }
				    else {
				        echo "setInterval(\"dynamicDiv('table_div', 'common/host/host_info.php')\", 1500);";
			        }
			    ?>
                </script>
	        </div>
			<div>
			    <?php
				    if (isset($_SESSION['uid'])) {
					    if (isset($_GET['user'])) {
						    echo "<a href=\"index.php\" >All Hosts</a>";
						}
						else {
			                echo "<a href=\"index.php?user={$_SESSION['uid']}\" >My Hosts</a>";
						}
						echo "<br />";
						echo "<a href=\"reservation.php\">Reservation</a>";
					}
				?>
			</div>
			
			<br />
		    <div id="table_div">
			</div>
		        
	    </div>
	
	    <?php include "common/footer.php"; ?>
	
    </div>
</body>

</html>
